import Loadable from 'react-loadable'
/*
    函数的参数的类型:()=>Promise<any>
*/
const withLoadable=(component:()=>Promise<any>)=>{
    return Loadable({
        loader:component,
        loading:()=><div>正在加载中</div>
    })
}
export default withLoadable